// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 新增经营-采购详情表数据 POST /manageDetail/add */
export async function manageDetailAdd(
  body: BIZAPI.ManageDetailCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResult>;

export async function manageDetailAdd(
  body: BIZAPI.ManageDetailCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResult>>;

export async function manageDetailAdd(
  body: BIZAPI.ManageDetailCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResult>;

export async function manageDetailAdd(
  body: BIZAPI.ManageDetailCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResult>(`/app/manageDetail/add`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResult>(`/app/manageDetail/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除经营-采购详情表数据 POST /manageDetail/delete */
export async function manageDetailDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResult>;

export async function manageDetailDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResult>>;

export async function manageDetailDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResult>;

export async function manageDetailDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResult>(`/app/manageDetail/delete`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResult>(`/app/manageDetail/delete`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购详情表数据 POST /manageDetail/get */
export async function manageDetailGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultManageDetailEntity>;

export async function manageDetailGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultManageDetailEntity>>;

export async function manageDetailGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultManageDetailEntity>;

export async function manageDetailGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultManageDetailEntity>(`/app/manageDetail/get`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultManageDetailEntity>(`/app/manageDetail/get`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购详情表VO数据 POST /manageDetail/getVo */
export async function manageDetailGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultManageDetailResp>;

export async function manageDetailGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultManageDetailResp>>;

export async function manageDetailGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultManageDetailResp>;

export async function manageDetailGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultManageDetailResp>(`/app/manageDetail/getVo`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultManageDetailResp>(`/app/manageDetail/getVo`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购详情表分页数据 POST /manageDetail/page */
export async function manageDetailPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageManageDetailEntity>;

export async function manageDetailPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageManageDetailEntity>>;

export async function manageDetailPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageManageDetailEntity>;

export async function manageDetailPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageManageDetailEntity>(
      `/app/manageDetail/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageManageDetailEntity>(`/app/manageDetail/page`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 更新经营-采购详情表数据 POST /manageDetail/update */
export async function manageDetailUpdate(
  body: BIZAPI.ManageDetailUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResult>;

export async function manageDetailUpdate(
  body: BIZAPI.ManageDetailUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResult>>;

export async function manageDetailUpdate(
  body: BIZAPI.ManageDetailUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResult>;

export async function manageDetailUpdate(
  body: BIZAPI.ManageDetailUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResult>(`/app/manageDetail/update`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResult>(`/app/manageDetail/update`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购详情表VO分页数据 POST /manageDetail/voPage */
export async function manageDetailVoPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageManageDetailResp>;

export async function manageDetailVoPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageManageDetailResp>>;

export async function manageDetailVoPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageManageDetailResp>;

export async function manageDetailVoPage(
  body: BIZAPI.ManageDetailQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageManageDetailResp>(
      `/app/manageDetail/voPage`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageManageDetailResp>(`/app/manageDetail/voPage`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
